
public class StaticFuncDemo {
    public static void main(String[] args) {
        inter1 instance = new Impl();
        instance.show1();
        instance.show2();
     //   instance.show3(); //报错--只能在包含接口类时调用 static 方法
        inter1.show3();
    }
}
class Impl implements inter1{

    @Override
    public void show1() {
        System.out.println("rewrite abstract function...");
    }

    @Override
    public void show2() {
        System.out.println("rewrite default function...");
    }
}
 interface inter1{
    void show1();
    default void show2(){
        System.out.println("default function running...");
    }
    static void show3(){
        System.out.println("static function running...");
    }
}